<style>
	#create input{
		margin-bottom: 5px;	
	}
</style>

<div class="column_center_bg1">
<div class="column_center_bg2">
<table style="width: 100%; border: 1px solid #c0c0c0;">
	<tbody>
		<tr>
			<td style="width: 100%;">
			<div class="product_box3">
			<div class="row1">
			<div class="bg_inner1">
			<div class="bg_inner2">
			<div class="bg_inner3"><img src="images/spacer.gif" alt="" width="1"
				height="1"><br>
			</div>
			</div>
			</div>
			</div>
			<div class="clear"></div>
			<div class="row2">
			<div class="bg_inner1">
			<div class="bg_inner2">
			<div class="bg_inner311">
			<div class="column-center-background"><!--content_center--> <!-- bof breadcrumb -->
			<!-- eof breadcrumb --> <!-- bof upload alerts --> <!-- eof upload alerts -->

			<div class="centerColumn" id="contactUsDefault">
			<address><strong>Dịch vụ khách hàng: 043.765.235<br>
			77 Nguyễn Phong Sắc,<br>
			Glasgow, DC 45 Fr 45.<br>
			</strong>
			</address>
			<div id="contactUsNoticeContent" class="content">
			<p><strong>Đăng nhập làm thành viên Gmode&nbsp;...</strong></p>
			<p>Vui lòng điền đầy đủ thông tin để đăng ký làm thành viên Gmode:</p>
			</div>
			<?php echo $this->html->beginForm("create",array("ajaxify" => $this->url->action("register", "Index")));?>
				<div class="alert forward">* Thông tin bắt buộc</div>
				<br class="clearBoth">
				<?php $this->html->labelFor("username", array("class" => "inputLabel"))?>
				<?php $this->html->textboxFor("username")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("username")?>
				<br class="clearBoth">
				<?php $this->html->labelFor("password", array("class" => "inputLabel"))?>
				<?php $this->html->passwordFor("password")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("password")?>
				<br class="clearBoth">
				<?php $this->html->labelFor("email", array("class" => "inputLabel"))?>
				<?php $this->html->textboxFor("email")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("email")?>
				<br class="clearBoth">
				<?php $this->html->labelFor("phone", array("class" => "inputLabel"))?>
				<?php $this->html->textboxFor("phone")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("phone")?>
				<br class="clearBoth">
				<?php $this->html->labelFor("fullname", array("class" => "inputLabel"))?>
				<?php $this->html->textboxFor("fullname")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("fullname")?>
				<br class="clearBoth">
				<?php $this->html->labelFor("address", array("class" => "inputLabel"))?>
				<?php $this->html->textboxFor("address")?>
				<span class="alert">*</span>
				<?php $this->html->validationMessageFor("address")?>
				<div align="left"><input style="width: 80px;" class="button-gray" type="submit" value="Đăng ký"/></div>
			<?php echo $this->html->endForm();?>
			</div>

			<!--eof content_center--></div>
			<div class="clear"></div>
			</div>
			</div>
			</div>
			</div>
			<div class="row3">
			<div class="bg_inner1">
			<div class="bg_inner2">
			<div class="bg_inner3"><img src="images/spacer.gif" alt="" width="1"
				height="1"></div>
			</div>
			</div>
			</div>
			</div>
			</td>
		</tr>
	</tbody>
</table>
</div>
</div>
<div class="column_center_bg3">
<div class="column_center_bg4">
<div class="column_center_bg5"><img src="images/spacer.gif" alt=""
	width="1" height="1"></div>
</div>
</div>

<script type="text/javascript">
	    $(document).ready(function(){
			$("#create").submit(function(){
		    	data = {
		    			username: $("#username").val(),
		    			password: $("#password").val(),
		    			email: $("#email").val(),
		    			fullname: $("#fullname").val(),
		    			phone: $("#phone").val(),
		    			address: $("#address").val()
		            };
		    		$.ajax({
			    		url: $("#create").attr("ajaxify"),
		        		data: data,
		        		type: "POST",
		        		dataType: "json",
		        		success: function(response){
		    				if(response.success)
		    				{
			    				alert("Chúc mừng bạn đã đăng ký tài khoản tại Gmode thành công!");
		    				}
		    				else
								alert(response.message);								
		            	}
		        	});
		        return false;
			});
	    });
    </script>